<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>分润管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript" src="${ctxStatic}/common/base-loading.js"></script>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/orders/shareOrder/list">分润列表</a></li>
		<shiro:hasPermission name="orders:shareOrder:save"><li><a href="${ctx}/orders/shareOrder/openSave">分润添加</a></li></shiro:hasPermission>
	</ul>
	<form:form id="searchForm" modelAttribute="shareOrder" action="${ctx}/orders/shareOrder/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li><label>iccid：</label>
				<form:input path="iccid" htmlEscape="false" maxlength="20" class="input-medium"/>
			</li>
			<li><label>订单号：</label>
				<form:input path="orderNo" htmlEscape="false" maxlength="20" class="input-medium"/>
			</li>
			<li><label>所属套餐：</label>
				<form:select path="pkgType" class="input-medium">
					<form:option value="" label=""/>
					<form:options items="${fns:getDictList('pkg')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
			</li>
			<li class="btns">
				<a id="btnSubmit" class="btn btn-primary" onclick="return page();"><i class="icon-search"></i>&nbsp;查询</a>
			</li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>iccid</th>
				<th>所属套餐</th>
				<th>套餐信息</th>
				<th>交易总金额</th>
				<th>成本价格</th>
				<th>分润金额</th>
				<th>订单号</th>
				<th>所属代理商</th>
				<th>上级代理商</th>
				<th>创建时间</th>
				<th>更新时间</th>
			</tr>
		</thead>
		<tbody>
		<c:choose>
			<c:when test="${not empty page.list}">
				<c:forEach items="${page.list}" var="shareOrder">
					<tr>
						<td>
							${shareOrder.iccid}
						</td>
						<td>
							${fns:getDictLabel(shareOrder.pkgType, 'pkg', '')}
						</td>
						<td>
							${shareOrder.remarks}
						</td>
						<td>
							${shareOrder.totalAmount}
						</td>
						<td>
							${shareOrder.costAmount}
						</td>
						<td>
							${shareOrder.shareAmount}
						</td>
						<td>
							${shareOrder.orderNo}
						</td>
						<td>
							${shareOrder.officeName}
						</td>
						<td>
							${shareOrder.superiorOfficeId}
						</td>
						<td>
							<fmt:formatDate value="${shareOrder.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
						</td>
						<td>
							<fmt:formatDate value="${shareOrder.updateDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
						</td>
					</tr>
				</c:forEach>
			</c:when>
			<c:otherwise>
				<tr>
					<td colspan="11" style="text-align: center;font-size:17px; font-family:SimHei">未查询到数据...</td>
				</tr>
			</c:otherwise>
			</c:choose>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>